<?php
namespace app\index\controller;
use \app\index\controller\Base;
use \think\Db;
class Index extends Base
{

    public function index()
    {
    	$seo=Db::name("seo")->where("class","index")->find();
            $this->assign("seo",$seo);
		//新闻大事件
        $da_news=Db::name('news')->where("type",'1')->order(["type_sort"=>"asc","id"=>"desc"])->limit(3)->select();
		$this->assign('da_news',$da_news);
		//新闻热点新闻
        $hot_news=Db::name('news')->where("type",'2')->order(["type_sort"=>"asc","id"=>"desc"])->limit(3)->select();        
		$this->assign('hot_news',$hot_news);
      
		
		
		// 中间banner
		$center_banner=Db::name("banner")->where("type",2)->order("id","desc")->find();
		$this->assign('center_banner',$center_banner);
    	$this->assign('menu','1');
        $this->assign('_title',"首页");
        return $this->fetch();
    }
}
